Test : aggregation edge cases for list and scalar values#14170
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded two pytest unit tests for aggregate_by_field: one checks list-valued element trimming and per-element counting while ignoring blanks/non-strings; the other checks scalar handling by ignoring None, numeric, and blank/whitespace-only strings. ChangesTest Coverage Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add focused unit tests to verify whitespace trimming and non-string filtering behavior in memory aggregation results.
7fa1917 to
b7b8021
Compare
|
Hi, @yingfeng , Could you review my PR, please? |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/unit_test/memory/utils/test_ob_conn_aggregation.py`:
- Around line 57-74: The two new tests
test_aggregates_list_values_and_trims_whitespace and
test_ignores_non_string_and_blank_scalar_values are missing the required pytest
priority markers; add the appropriate pytest marker (e.g., `@pytest.mark.p1` or
`@pytest.mark.p2/`@pytest.mark.p3 per project guidelines) above each test function
so they include a priority marker, and ensure you import pytest if not already
present so the decorators resolve.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 16f5e3ca-fd10-4cdf-b683-109f1fb55000
📒 Files selected for processing (1)
test/unit_test/memory/utils/test_ob_conn_aggregation.py
Ensure new unit tests follow test suite marker conventions for CI and reviewer checks.
|
Hi, @yingfeng , Could you review my PR, please? |
|
hi, @yingfeng , Could you review my PR? |
|
Hi, @yingfeng , Could you review my PR, please? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14170 +/- ##
==========================================
- Coverage 96.66% 94.16% -2.50%
==========================================
Files 10 10
Lines 690 703 +13
Branches 108 112 +4
==========================================
- Hits 667 662 -5
- Misses 8 25 +17
- Partials 15 16 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR adds focused unit tests for aggregate_by_field in OceanBase memory utilities to improve behavior coverage for real-world input shapes.
Why this helps
It strengthens regression protection for aggregation logic used by memory retrieval flows, with no production code changes and minimal review risk.